package com.cyyz.tai.service;

import com.cyyz.tai.dao.DashPointDao;
import com.cyyz.tai.model.DashPoint;
import com.vteba.common.service.impl.DefaultServiceImpl;
import com.vteba.tx.dao.impl.HibernateDaoImpl;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import jakarta.transaction.Transactional;

import java.util.List;

@Named
@Transactional
public class DashPointService extends DefaultServiceImpl<DashPoint, String> {

    private DashPointDao dashPointDao;

    @Inject
    @Override
    public void setBasicDao(HibernateDaoImpl<DashPoint, String> dashPointDao) {
        this.hibernateDao = dashPointDao;
        this.dashPointDao = (DashPointDao) dashPointDao;
    }

    // public void save(DashPoint point) {
    //     // 不开启事务，使用persist方法是有问题的，找不到事务
    //     // Unable to locate persister: com.cyyz.tai.model.DashPoint
    //     // 上面这个问题是啥问题啊？// 因为没有扫描到实体类。默认只扫描当前主类包下的
    //     this.dashPointDao.persist(point);
    // }

    // public List<DashPoint> queryList(DashPoint query) {
    //     return dashPointDao.queryList(query);
    // }
}
